<!--
  描述：保修信息详情页
  @author tanghongjun
  @since 2020-06-09 11:07:32
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>新增或编辑分类</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-elem-quote layui-text">
        <zmn th:text="${(warrantyInfo.warrantyInfoId == 0) ? '新增保修信息' : '修改'+warrantyInfo.name}"></zmn>
    </blockquote>

    <div class="layui-card">
        <form method="post" action="" class="layui-form" lay-filter="zmn-form">

            <input type="hidden" name="warrantyInfoId" th:value="${warrantyInfo.warrantyInfoId}"/>

            <div class="layui-card-header" style="margin-top:10px;"><b>基本信息</b></div>
            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item" th:if="${warrantyInfo.warrantyInfoId > 0}">
                <label class="layui-form-label">ID：</label>
                <div class="layui-input-block">
                    <div class="layui-form-mid">
                        <span th:text="${warrantyInfo.warrantyInfoId}">ID</span>
                        <span th:text="${warrantyInfo.status == 2 ? '启用' : '禁用'}">status</span>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">保修信息id：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="warrantyInfoId" th:value="${warrantyInfo.warrantyInfoId}" placeholder="保修信息id"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">价格表服务项ID：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="itemId" th:value="${warrantyInfo.itemId}" placeholder="价格表服务项ID"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">产品2级分类ID：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="categId" th:value="${warrantyInfo.categId}" placeholder="产品2级分类ID"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属平台：1言而有信 2啄木鸟 3川南环保 4一步维修：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="plat" th:value="${warrantyInfo.plat}" placeholder="所属平台：1言而有信 2啄木鸟 3川南环保 4一步维修"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">保修规则ID：1不保修，2整机保修, 3同性质且同部位故障, 4安装引起的故障, 5清洗引起的故障, 6同性质故障</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="ruleId" th:value="${warrantyInfo.ruleId}" placeholder="保修规则ID：1不保修，2整机保修, 3同性质且同部位故障, 4安装引起的故障, 5清洗引起的故障, 6同性质故障"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">保修时长：单位：天：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="warrantyDurationStr" th:value="${warrantyInfo.warrantyDurationStr}" placeholder="保修时长：单位：天"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">保修内容ID组合字符串，多个用$分开 eg $1001$1000$1002$：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="warrantyContentIdStr" th:value="${warrantyInfo.warrantyContentIdStr}" placeholder="保修内容ID组合字符串，多个用$分开 eg $1001$1000$1002$"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">创建人：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="creater" th:value="${warrantyInfo.creater}" placeholder="创建人"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">创建时间：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="createTime" th:value="${warrantyInfo.createTime}" placeholder="创建时间"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">更新人：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="updater" th:value="${warrantyInfo.updater}" placeholder="更新人"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">更新时间：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="updateTime" th:value="${warrantyInfo.updateTime}" placeholder="更新时间"
                               lay-verify="required" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <zmn th:if="${warrantyInfo.warrantyInfoId > 0}">
                <div class="layui-card-header"><b>其他信息</b></div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-form-item layui-form-item-xs">
                    <label class="layui-form-label">修改人/时间</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux"
                             th:text="${warrantyInfo.updater} + '&nbsp;/&nbsp;' + ${#dates.format(warrantyInfo.updateTime, 'yyyy-MM-dd HH:mm:ss')}">
                            修改人/时间
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-xs">
                    <label class="layui-form-label">创建人/时间</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux"
                             th:text="${warrantyInfo.creater} + '&nbsp;/&nbsp;' + ${#dates.format(warrantyInfo.createTime, 'yyyy-MM-dd HH:mm:ss')}">
                            创建人/时间
                        </div>
                    </div>
                </div>
            </zmn>

            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item layui-layout-admin">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0;">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit" th:if="${#authPermit.checkPermit('/warranty/warrantyinfo/addEdit.action')}">保存</button>
                        <button class="layui-btn layui-btn-primary" id="cancleBtn">
                            取消
                        </button>
                    </div>
                </div>
            </div>

        </form>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        warrantyInfo: [[${warrantyInfo}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        plat_warrantyinfo_detail: "warranty/warrantyinfo/zmn.plat.warrantyinfo.edit",
    }).use(['index', 'plat_warrantyinfo_detail']);

</script>
</body>
</html>